import request from '@/utils/request'

//获取详情
export function getSchool(){
    return request({
      url: '/school',
      method: 'get'
    })
}


//提交审核
export function submitData(data){
  return request({
    url:'/school/approval',
    method:'put',
    data
  })
}

//获取基础信息
export function getBaseInfo(data){
  return request({
      url: '/school/baseinfo',
      method: 'get',
      params:data,
      headers:{
        'showLoading':false
      }
  })
}

//编辑基础信息
export function editbaseInfo(data){
  return request({
    url:'/school/updatebaseinfo',
    method:'put',
    data
  })
}
//机构列表
export function schoolteam(data){
  return request({
    url:'/school/team',
    method:'get',
    headers:{
      'showLoading':true
    },
     params:data,
  })
}
//机构详情
export function schoolteamread(data){
  return request({
    url:'/school/team/read',
    method:'get',
    headers:{
      'showLoading':false
    },
     params:data,
  })
}
//创建机构
export function schoolteamcreate(data){
  return request({
    url:'/school/team/create',
    method:'post',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//s删除机构
export function schoolteamdelete(data){
  return request({
    url:'/school/team/delete',
    method:'delete',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//编辑机构
export function schoolteamupdate(data){
  return request({
    url:'/school/team/update',
    method:'put',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//切换机构状态
export function schoolteamupdateState(data){
  return request({
    url:'/school/team/updateState',
    method:'put',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//机构审核
export function schoolteamapproval(data){
  return request({
    url:'/school/team/approval',
    method:'put',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//
export function photoupload(data){
  return request({
    url:'/school/photo/upload',
    method:'post',
    headers:{
      'showLoading':false
    },
    data,
  })
}
//
export function schoolphoto(data){
  return request({
    url:'/school/photo',
    method:'get',
    headers:{
      'showLoading':true,

    },
    params:data,
  })
}
export function photodelete(data){
  return request({
    url:'/school/photo/delete',
    method:'delete',
    headers:{
      'showLoading':false,

    },
  data,
  })
}
// 
export function description(data) {
  return request({
    url: '/school/description',
    method: 'get',
    params: data,
    headers: {
      'showLoading': true,
      'loadingTarget': '.innerloding'
    }
  })
}

export function descriptionupdate(data) {
  return request({
    url: '/school/description/update',
    method: 'put',
    data,
    headers: {
      'showLoading': false,
    }
  })
}
